package com.example.myapplication.chap01;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.myapplication.R;

public class LoginAAA extends AppCompatActivity implements View.OnClickListener {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.login);

        ListView lv = findViewById(R.id.lv);
        String [] aaa = {"errr","rrr","gg","dddd","rrr","rrrr","fff"};
        ArrayAdapter<String> ad = new ArrayAdapter<>(this, android.R.layout.simple_expandable_list_item_1,aaa);
        lv.setAdapter(ad);
    }
//        Button bt  = findViewById(R.id.button5);
//        bt.setOnClickListener(this);
//
//        Button bt2 = findViewById(R.id.bt_08);
//        // 匿名对象
//        bt2.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Log.e("world","123456789dfghjhgfdfghj");
//                Toast.makeText(LoginAAA.this,"dddddddd",Toast.LENGTH_LONG).show();
//            }
//        });
//    }

    @Override
    public void onClick(View v) {
//        if( v.getId() == R.id.button5){
//
//        }

        Log.e("Hello","123456789dfghjhgfdfghj");
        Toast.makeText(this,"1234567890",Toast.LENGTH_LONG).show();
    }
}
